#{extends '/F/_web.html'/}
#{set title:'首页'/}



<div class="btn-group" role="group" aria-label="...">
    <a href="@{F.newest}" type="button" class="btn btn-default">最新</a>
    <a href="@{F.hotest}" type="button" class="btn btn-default">热门</a>
    <a href="@{F.excellent}" type="button" class="btn btn-default">精选</a>
</div>
<p></p>

<div class="row">
    #{list posts, as:"post"}

    <div class="col-md-3 list-box">
        #{if post.main_images&&post.main_images.size()>0}<img src="@{Resources.raw(post.main_images[0].hash,'s')}">#{/if}
        <h4 class="panel-title">
            <a href="@{F.view_post(post.id)}">
                ${post.subject}
            </a>
        </h4>
        <div class="action-buttons"><a href="@{F.edit_post(post.id)}" class="btn btn-default  btn-sm">修改</a><a href="@{F.del_post(post.id)}" class="btn btn-default  btn-sm">删除</a></div>
        <div>
            <a href="@{F.view_board(post.board?.id)}">${post.board?.name}</a>
        </div>
        <div>
            <div>${post.summary}</div>
        </div>
    </div>
    #{/list}
</div>

